# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/www-apps/postfixadmin/postfixadmin-2.1.0-r1.ebuild,v 1.3 2008/06/01 15:08:28 wrobel Exp $

inherit eutils depend.php confutils

DESCRIPTION="Web Based GPL'ed framework for managing accounts and systems in LDAP databases."
HOMEPAGE="https://oss.gonicus.de/labs/gosa/wiki"
SRC_URI="ftp://oss.gonicus.de/pub/${PN}/${PN}-core-${PV}.tar.gz"

LICENSE="GPL"
KEYWORDS="~amd64 ~x86"
IUSE=""

DEPEND=""
RDEPEND="${DEPEND}"
SLOT="0"


src_install() {
	cd ${PN}-core-${PV}
	local docs="AUTHORS COPYING CODING COPYING FAQ README 
	    README.safemode update-gosa.pod update-online-help.1 
	    gosa-encrypt-passwords.1 update-online-help.pod 
	    gosa-encrypt-passwords.pod update-locale.1 dh-make-gosa.1 
	    update-locale.pod update-pdf-help.1 update-gosa.1 
	    update-online-help update-pdf-help.pod"
	dodoc ${docs}
	rm -rf ${docs} 
	
	dodir "/etc/gosa"
	fowners root:apache /etc/gosa
	fperms 740 /etc/gosa
	
	dodir "/var/spool/gosa"
	fowners apache:apache /var/spool/gosa
	fperms 770 /var/spool/gosa
	
	
	dodir "/usr/share/gosa"
	fowners apache:apache /usr/share/gosa
	fperms 770 /usr/share/gosa
	
	insinto "/usr/share/gosa/"
	doins -r ./*
}
